<?php
/**********************************************
* 파일명: ttskin.php
* 설  명: 텍스트큐브 공개스킨 목록을 보여주는 파일입니다.
***********************************************/
	$total = 0;
	$pages = 0;
	list($total, $pages, $skindata,$info) = TT_SkinManagerGetSkinData($page,$skin_category);
	$paging = array();
	$paging['total'] = $total;
	$paging['url'] = '';
	$paging['pages'] = $pages;
	$paging['page'] = $page;
	$paging['postfix'] = NULL;
	$paging['prefix'] = $pluginSelfParam . '&amp;mode=ttskin&amp;category='.$skin_category.'&amp;page=';
	if($page > 1)	$paging['prev'] = $pluginSelfParam . '&mode=ttskin&category='.$skin_category.'&page='.($page -1);	
	if($page < $pages)	$paging['next'] = $pluginSelfParam . '&mode=ttskin&category='.$skin_category.'&page='.($page +1);		
	
	$GLOBALS['paging'] =$paging;
	
	$pagingTemplate = '[##_paging_rep_##]';
	$pagingItemTemplate = '<a [##_paging_rep_link_##]>[[##_paging_rep_link_num_##]]</a>';
?>
	<div class="skinList">
<?php 
	if (!empty($info)){
?>
		<p class="notice"><a href="<?php echo htmlspecialchars($info['link']);?>" target="_blank"><?php echo $info['title'];?></a></p>
<?php
	}
?>
		<ul class="navigation">
			<li <?php if($skin_category =="") echo 'class="selected"';?>><a href="<?php echo $pluginSelfParam . '&amp;mode=ttskin';?>"><?php echo pluginLang::plts('전체 스킨');?></a></li>	
			<li <?php if($skin_category =="1") echo 'class="selected"';?>><a href="<?php echo $pluginSelfParam . '&amp;mode=ttskin&amp;category=1';?>"><?php echo pluginLang::plts('1단 스킨');?></a></li>	
			<li <?php if($skin_category =="2") echo 'class="selected"';?>><a href="<?php echo $pluginSelfParam . '&amp;mode=ttskin&amp;category=2';?>"><?php echo pluginLang::plts('2단 스킨');?></a></li>
			<li <?php if($skin_category =="3") echo 'class="selected"';?>><a href="<?php echo $pluginSelfParam . '&amp;mode=ttskin&amp;category=3';?>"><?php echo pluginLang::plts('3단 스킨');?></a></li>	
			<li <?php echo ($skin_category =="4") ? 'class="lastChild selected"' : 'class="lastChild"';?>><a href="<?php echo $pluginSelfParam . '&amp;mode=ttskin&amp;category=4';?>"><?php echo pluginLang::plts('기타 스킨');?></a></li>
		</ul>
		<ul class="mySkinList2">
<?php
$i = 1;
if(!is_null($skindata)){
	foreach($skindata as $item){
		TT_SkinManagerSkinPrint($item);
//		if($i % 2 == 0) echo "<div style='clear:both;margin-bottom:10px;'></div>";
	$i++;
	}
}else{
echo "<div style='height:30px;text-align:center'>".pluginLang::plts('선택한 분류의 텍스트큐브 공개스킨이 없습니다.')."</div>";
}
?>
		</ul>
		<div class="paging">
<?php
	echo str_repeat("\t", 3).Paging::getPagingView($paging, $pagingTemplate, $pagingItemTemplate).CRLF;
?>
		</div>
		<div style="clear:both;"></div>
	</div>


